<!DOCTYPE html>
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  <link rel="stylesheet" href="../css/element.css">
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">

  <script src="../js/vue.js"></script>
  <script src="../js/element.js"></script>
  <script src="../js/axios.js"></script>
  <script src="../jss/requestjs.js"></script>
  <script src="../jss/admin-list.js"></script>
  <script src="../js/jquery-3.5.1.min.js"></script>
  <script src="../lib/layui/layui.js" charset="utf-8"></script>
  <script src="../js/xadmin.js"></script>
    <script src="../js/md5.js"></script>
    <script src="../js/common.js"></script>
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body" id="app">
     <!-- <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
      <input class="layui-input" placeholder="开始日" name="start" id="start">
      <input class="layui-input" placeholder="截止日" name="end" id="end">
      <input type="text" name="username"  placeholder="请输入用户名" autocomplete="off" class="layui-input">
      <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
    </form>
    </div>-->
      <xblock>
        <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
        <button class="layui-btn" onclick="x_admin_show('添加用户','/sys/add')"><i class="layui-icon"></i>添加</button>
        <span class="x-right" style="line-height:40px">共有数据：{{pagination.total}} 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <th>
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>ID</th>
            <th>登录名</th>
            <th>手机</th>
            <th>邮箱</th>
            <th>角色</th>
            <th>加入时间</th>
            <!--<th>状态</th>-->
            <th>操作</th>
        </thead>
        <tbody>
          <tr v-for="(item,index) of sysuser" :key="item.uaid">
            <td>
              <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{{item.uaid}}</td>
            <td>{{item.username}}</td>
            <td>{{item.phone}}</td>
            <td>{{item.email}}</td>
            <td>{{item.rname}}</td>
            <td>{{item.lastLoginTime}}</td>
            <td class="td-manage">
              <el-row>
                  <el-button type="primary" round @click="updateuser(index)">修改</el-button>
                  <el-button type="danger" round @click="deleteuser(item.uaid,item.username)">删除</el-button>
              </el-row>
            </td>
          </tr>
        </tbody>
      </table>
      <el-pagination background layout="prev, pager, next,sizes,total" :total="pagination.total" :page-size="pagination.pageSize"
                     :current-page="pagination.pageNum" @size-change="sizeChange" @current-change="findBlogPageList">
      </el-pagination>



      <el-dialog title="用户修改"
              width="50%"
                 :visible.sync="dialogVisible">
        <span>
                  <form>
          <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>登录名
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="username" name="username"
                         autocomplete="off" class="layui-input" v-model="beisysuser.username">
              </div>
              <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>将会成为您唯一的登入名
              </div>
          </div>
          <div class="layui-form-item">
              <label for="phone" class="layui-form-label">
                  <span class="x-red">*</span>手机
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="phone" name="phone"
                         autocomplete="off" class="layui-input" v-model="beisysuser.phone">
              </div>
              <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>将会成为您唯一的登入名
              </div>
          </div>
          <div class="layui-form-item">
              <label for="L_email" class="layui-form-label">
                  <span class="x-red">*</span>邮箱
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="L_email" name="email"
                         autocomplete="off" class="layui-input" v-model="beisysuser.email">
              </div>
              <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>
              </div>
          </div>
        <div class="layui-form-item" >
              <label class="layui-form-label"><span class="x-red">*</span>角色</label>
              <div class="layui-input-block">
            <el-checkbox-group v-model="beisysuser.checkList">
                  <el-checkbox v-for="item in rolearray" :key="item.rid" :label="item.rid">{{item.rname}}</el-checkbox>
            </el-checkbox-group>
              </div>
          </div>


          <div class="layui-form-item">
              <label for="L_pass" class="layui-form-label">
                  <span class="x-red">*</span>密码
              </label>
              <div class="layui-input-inline">
                  <input type="password" id="L_pass" name="pass"
                         autocomplete="off" class="layui-input" v-model="beisysuser.password">
              </div>
              <div class="layui-form-mid layui-word-aux">
                  6到16个字符
              </div>
          </div>
          <div class="layui-form-item">
              <label for="L_repass" class="layui-form-label">
                  <span class="x-red">*</span>确认密码
              </label>
              <div class="layui-input-inline">
                  <input type="password" id="L_repass" name="repass" v-model="beisysuser.passwordtwo"
                         autocomplete="off" class="layui-input">
              </div>
          </div>
      </form>



        </span>
        <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="sysupdate">修 改</el-button>
  </span>
      </el-dialog>
        <el-dialog title="用户删除"
                   width="50%"
                   :visible.sync="deleteSysUser">
        <span>
            你确定要删除用户{{beisysuser.username}}?
        </span>
            <span slot="footer" class="dialog-footer">
    <el-button @click="deleteSysUser = false">取 消</el-button>
    <el-button type="primary" @click="sysdelete">删 除</el-button>
  </span>
        </el-dialog>
    </div>

  </body>

</html>